-
Notifications
You must be signed in to change notification settings - Fork 1k
SPI: improvements for SPI library #912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bb18006
to
b335b0c
Compare
- optimize spi_transfer routine to use LL instead of HAL - add SPISettings field for transmit only operations - replace spi_send with call to spi_transfer with SPI_TRANSMITONLY flag - allow SPI_TRANSFER_TIMEOUT redefinition Signed-off-by: Alexey Golyshin <[email protected]>
spi_tranfer: factorize common code to simplify maintenance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM waiting @fpistm feedback
such blind send should be possible with dma, but don't know if any compatibility issues will rise |
it's not a blind send, it checks for the state before DR register access, this is exactly what HAL_SPI_TransmitRecieve does, but shorter and much faster cuz much overhead stuff dropped. But anyway, any compatibility tests are welcomed. Ive tested it with all my stm32 fleet available (f103/f401/f405/f051) but sure thats not enuff to be sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not compatible with H7 and MP1 series due to LL API usages.
Signed-off-by: Alexey Golyshin <[email protected]>
Unfortunately i have no H7 or MP1 board to check |
Thanks @stas2z I will test H7 and MP1 |
SPI: Dedicated start/stop transfer for STM32H7 and STM32MP1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Linked to stm32duino#912. Signed-off-by: Frederic Pillon <[email protected]>
Linked to stm32duino#912. Signed-off-by: Frederic Pillon <[email protected]>
Linked to stm32duino#912. Signed-off-by: Frederic Pillon <[email protected]>
Linked to stm32duino#912. Signed-off-by: Frederic Pillon <[email protected]>
My suggestion for #898